package com.dsbj.mp.icardservice.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

@Data
@TableName("H_A_DAYREPORT")
public class Dayreport extends BaseEntity implements Serializable {
	
	private static final long serialVersionUID = 1L;
	
	@TableId(value = "id", type = IdType.UUID)
	private String id; // GUID主键
	
	private String companyno;  //公司编号
	
	private String companyno1;  //公司编号
	
	private String rptdate;     //日期 （yyyy-MM-dd)
	
	private String week;  // 星期
	
	private Integer yearmonth; // 月份（yyyyMM)
	
	private String employeeno; // 工号
	
	private String inEmployeeno; // 工号
	
	private String fananEmployeeno;
	
	private String shiftno; // 班次编号
	
	private String sstime; //班次开始时间 （精确到分钟
	
	private String setime; // 班次结束时间
	
	private String rstime1;//班次休息开始时间1
	
	private String retime1; // 班次休息休息结束时间1
	
	private String rstime2;//班次休息开始时间2
	
	private String retime2;//班次休息结束时间2
	
	private String realsstime;//实际开始时间 精确到分钟
	
	private String realsetime;// 实际结束时间
	
	private String realrstime1;// 时间休息开始时间1
	
	private String realretime1;//时间休息结束时间1
	
	private String realrstime2;//时间开始休息时间2
	
	private String realretime2;//时间休息结束时间2
	
	private Integer latetype;//迟到类别（0，迟到，1，厂车迟到）
	
	private Integer lateminute;// 迟到分钟数
	
	private Integer earlyminute;// 早退分钟数
	
	private String otno;//加班单号
	
	private Float otnohour;//加班单加班小时
	
	private Float realothour;//实际加班小时
	
	private Float wothour;//结算加班小时（纳入薪资计算的加班小时）
	
	private Float wothourtx; // 结算加班小时 计调休
	
	private Float wot2hour;//双休加班小时（纳入薪资计算的加班小时）
	
	private Float wot2hourtx; // 双休加班小时 计调休
	
	private Float wot3hour; // 三倍加班小时 计薪资
	
	private String ottype;//加班类别（平时加班，周末加班，国假加班）
	
	private String restno;//假单号
	
	private String restclassno; //假别编号
	
	private String restclassname;//假别民粹
	
	private Float salaryresthour;//有新假小时
	
	private Float nosalaryresthour;//无薪假小时
	
	private Float planworkhour;//计划工作时间（固定8小时）
	
	private Float realworkhour;//实际工作时间
	
	private Float isabsenteeism;//是否旷工
	
	private Float nightshift;//夜班
	
	private String exceptiondesc;//异常
	
	private String aotNo; //提前加班男号
	
	private Float aotNoHour; //提前加班单小时
	
	private Float otearlyMinute;// 加班早退分钟（只针对轮班且超过8小时的班次） OTEarlyMinute
	
	private String shiftname;
	
	private String employeename;
	
	private String deptno;
	
	private String fanganids;// 自定义的方案IDs
	
	private String[] deptnos;
	
	private String[] fangandeptnos;
	
	private String deptname;
	
	private String seconddeptname;//二级部门名称
	
	private String employeenoArray;
	
	private String minTime;
	
	private String maxTime;
	
	private Integer nightshiftone;
	
	private Integer nightshifttwo;
	
	private String exception;//异常
	
	private String shiftno_a;
	
	private String eod;//入职日期
	
	private String dismissiondate;//离职日期
	
	private String[] ids;
	
	private String deptnoslike;
	
	private Float workhourot3;//平时转国假时数
	
	private Float allTime;//全部上班时间
	
	private String userId;
	
	private String startDate;
	
	private String endDate;
	
	private String firstdeptname;
	
	
	public Float getTotalworkhour() {
		Float realot = (float) 0;
		Float ot = (float) 0;
		Float ot2 = (float) 0;
		Float ot3 = (float) 0;
		if (this.getRealworkhour() != null) {
			realot = this.getRealworkhour();
		}
		if (this.getWothour() != null) {
			ot = this.getWothour();
		}
		if (this.getWot2hour() != null) {
			ot2 = this.getWot2hour();
		}
		if (this.getWot3hour() != null) {
			ot3 = this.getWot3hour();
		}
		return realot + ot + ot2 + ot3;
	}
	
}